<template>
  <div class="bg-grey" @click.self="toParent" v-if="!show">
    <mt-picker :slots="slots" @change="onValuesChange" value-key="value" showToolbar>

    </mt-picker>
  </div>
</template>
<script>
  export default{
      data(){
          return{
            value:'',
            slots:[{
              flex: 1,
              values: [{
                  value:'已婚',
                  id:1
              },{
                value:'未婚',
                id:2
              }],
              className: 'slot1',
              textAlign: 'center',
              defaultIndex: 0
            }]
          }
      },
    methods:{
      toParent(){

      },
      onValuesChange(picker, values){
        this.value = values[0]
      }
    }
  }
</script>
